﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace KingSite.Library.Sms {
    public class SmsHelper {
        static ISmsSetting smsSetting = new SmsSetting();

        public static ISms GetInstance() {
            string[] type = smsSetting.SmsType.Split(',');
            string a = type[1];
            string n = type[0];
            Assembly ass = Assembly.Load(a);
            Type[] t = ass.GetTypes();
            object o = ass.CreateInstance(n);
            return (ISms)o;
        }
    }
}
